home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / tools / pcuser.com / COPYFILE.C < prev    next >
Encoding:
C/C++ Source or Header  |  1989-02-03  |  430 b   |  17 lines

  1. #include <string.h>
  2. #include <stdlib.h>
  3.  
  4. copyfile (input, output)
  5. char *input, *output;
  6. {
  7.     char Copy[128] = "copy";
  8.  
  9.     strncat (Copy, "\040", 1);
  10.     strncat (Copy, input, strlen(input));
  11.     strncat (Copy, "\040", 1);
  12.     strncat (Copy, output, strlen(output));
  13.  
  14.     return (system (Copy));     /* Returns: 0 if successful         */
  15.                                 /*          nonzero if error occurs */
  16. }
  17.